package com.sishu.njrtsdms.config.jooq;

import com.sishu.njrtsdms.jooq.listener.AuditVisitListener;
import com.sishu.njrtsdms.jooq.listener.MyExecuteListener;
import org.jooq.impl.DefaultConfiguration;
import org.springframework.boot.autoconfigure.jooq.DefaultConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JOOQConfig {


    @Bean
    public DefaultConfigurationCustomizer configurationCustomizer() {
        return (DefaultConfiguration c) -> {
            c.set(MyExecuteListener::new);
            c.set(AuditVisitListener::new);
        };
    }
}
